package ast;

import java.util.ArrayList;

public class FunApp extends Term {

	private String name;
	private ArrayList<Term> argList;
	
	public FunApp(String nm, ArrayList<Term> al)
	{
		name = nm;
		argList = al;
	}
	
	public String getName() {
		return name;
	}

	public ArrayList<Term> getArgList() {
		return argList;
	}
	
	public String toString()
	{
		String res = name + "(";
		for (int i = 0; i < argList.size(); i++) {
			res += argList.get(i);
			if (i < argList.size() - 1)
				res += ", ";
		}
		res += ")";
		
		return res;		
	}
}
